<template>
  <div class="login_container">
    <div class="login_inputs">
      <h3 class="login_title">
        张逸卿点餐管理系统
      </h3>
      <div class="login_inputs_con">

        <div class="input-wrapper">
          <el-input size="large" v-model="account" placeholder="账号"></el-input>
          <svg class="icon icon-inner"><use xlink:href="#icon-user"></use></svg>
        </div>

        <div class="input-wrapper">
          <el-input size="large" type="password" v-model="password" placeholder="密码"></el-input>
          <svg class="icon icon-inner"><use xlink:href="#icon-pass"></use></svg>
        </div>

        <!-- <el-button type="primary" size="large" class="btn_login_back"  @click="submit"><i class="iconfont">&#xe82c;</i>登录</el-button> -->
        <el-button type="success" size="large" class="btn_login_back"  @click="submit">登录</el-button>
        
      </div>
    </div>
  <div class="bottom_login">
    &copy; 2018 张逸卿点餐管理系统
  </div>
</div>
</template>

<script>
  export default {
    data() {
      return {
        options: [{
          value: 'bistro',
          label: '餐馆'
        },{
          value: 'head_store',
          label: '总店'
        }],
        type: 'bistro',
        account: 'root',
        password: '123456',
      }
    },
    methods: {
      submit() {
//        if(this.type == 'bistro') {
          this.$store.dispatch('signin', {account: this.account, password: this.password})
//        }
//        if(this.type == 'head_store') {
//          this.$store.dispatch('signinHead', {account: this.account, password: this.password})
//        }
      },
    },
  }
</script>

<style scoped>
  .input-wrapper { position: relative; }
  .icon-inner { position: absolute; left: 0; top: 8px; }
</style>
